<?
include("session.php"); 
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../../../webkit/utils/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="../../page.css"/>
</head>
<body  bgcolor="#f4f4f4" style="margin:0px;" scroll=no>
<table width=100% cellspacing=1 cellpadding=3>
	<form name=f enctype='multipart/form-data' action="task_query.php?action=import_text&task_id=<?echo $_GET['task_id']?>" method=post target=free>
    <tr>
        <td align=right nowrap valign=top style="padding-top:9px">选择文件</td><td>
			<input name='upload_file' class='input' type=file style='width:400px'><br>
			<font color=#555555>【说明】：<br>
			1, 为了保证弹屏速度，仅限html文件；<font color=red>请将doc文档先另存为html文件</font>；<br><br>
		</td>
    </tr>
	</form>
	<tr>
		<td align=center colspan=4><hr size=1><input type="button" class="button" id="btn_save" value="确认导入" onclick="save()">　　<input type="button" class="button" value="关闭窗口" onclick="parent.closeDlg()"></td>
	</tr>
</table>
<script type="text/javascript">

	var f = document.f;
	function save() {
		if(f.upload_file.value == '') {
			alert('请选择要导入的文件！');
			return false;
		}
		if(f.upload_file.value.indexOf(".htm") < 0) {
			alert("仅限导入html网页格式文件！");
			return false;
		}
		if(confirm('确认要进行导入吗？')) {
			$('#btn_save').val('处理中...');
			$('#btn_save').attr('disabled', true);
			f.submit();
		}
	}; 


	function upload_completed(n) {
		alert("已成功导入营销话术模板！");
		parent.refreshGrid();
		parent.closeDlg();
	}

    
</script>
<iframe name="free" width=1 height=0></iframe>
</body>
</html>